package com.qf.flash.ui.chat.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.qf.flash.R;
import com.qf.flash.model.GroupDetailBean;
import com.qf.flash.utils.ImageLoader;
import com.qf.flashlib.adapter.BaseRViewItem;
import com.qf.flashlib.adapter.RViewHolder;

public class TeamChatItem extends BaseRViewItem<GroupDetailBean.UsersBean> {


    @Override
    public int getItemLayout() {
        return R.layout.item_team_chat;
    }

    @Override
    public void convert(RViewHolder holder, GroupDetailBean.UsersBean entity, int position, int itemSize) {
        ImageView iv = holder.getView(R.id.iv_head);
        ImageView ivDec = holder.getView(R.id.iv_dec);
        ImageLoader.loadCircle(holder.getmConvertView().getContext(), entity.getPhoto(), iv);
        Glide.with(ivDec).load(entity.getPhotoLineImage()).into(ivDec);
        holder.setText(R.id.tv_name,entity.getName());

    }
}
